<template>
    <div class="page transaction">
        <div class="header_bar flex_space_between gshadow">
            <div class="title">账单</div>
        </div>
        <tabs v-model="active" color="#1989fa" title-active-color="#1989fa">
            <tab title="交易汇总查询">
                <transaction-summary></transaction-summary>
            </tab>
            <tab title="交易明细查询">
                <div class="calendar_block">
                    <filter-picker></filter-picker>
                </div>
                <detail></detail>
            </tab>
        </tabs>
        <!-- <van-sticky :offset-top="40">
            <div class="transaction_tabs flex_space_between">
                <div class="transaction_tab" :class="{transaction_active_tab: '/tabs/transaction' === activePath}" @click="changeRoute('/tabs/transaction')">交易汇总查询</div>
                <div class="transaction_tab " :class="{transaction_active_tab: '/tabs/transaction/detail' === activePath}" @click="changeRoute('/tabs/transaction/detail')">交易明细查询</div>
            </div>
        </van-sticky>
    <router-view />-->
    </div>

</template>

<script>
import FilterPicker from "@/components/picker/filter-picker";

import transactionSummary from "@/moduleC/views/tabs/blocks/transactionSummary.vue";
import Detail from "@/moduleC/views/tabs/blocks/transactionDetail";
import { Tab, Tabs } from "vant";
import { Calendar } from "vant";


export default {
    // beforeRouteUpdate(to, from, next) {
    //     this.activePath = to.path;
    //     next();
    // },
    name: "transaction",
    components: { Tab, Tabs, Detail, transactionSummary, FilterPicker },
    data() {
        return {
            // activePath: '/tabs/transaction'
            active: 0,
        };
    },
    methods: {
        // changeRoute(path) {
        //     this.$router.replace(path);
        // }
    }
};
</script>

<style lang="scss" scoped>
.transaction {
    padding-top: 94px;
    padding-bottom: 44px;

    /deep/ .van-tabs__wrap {
        width: 100%;
        height: 44px;
        position: fixed;
        top: 50px;
        z-index: 10;
    }
}
</style>